import { useCallback } from 'react';
import useBasisCash from './useBasisCash';
import useHandleTransactionReceipt from './useHandleTransactionReceipt';

const useHarvestS = () => {
  const basisCash = useBasisCash();
  const handleTransactionReceipt = useHandleTransactionReceipt();

  const handleReward = useCallback(() => {
    handleTransactionReceipt(
      basisCash.harvestS(),
      `Claim sSHARE from shareSplit`,
    );
  }, [basisCash]);

  return { onRewardS: handleReward };
};

export default useHarvestS;
